<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <title>ActionDispatch::TestProcess</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" />
<link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" />
<link rel="stylesheet" href="../../css/github.css" type="text/css" media="screen" />
<script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script>
<script src="../../js/main.js" type="text/javascript" charset="utf-8"></script>
<script src="../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script>

</head>

<body>     
    <div class="banner">
        
            <span>Ruby on Rails v4.0.0</span><br />
        
        <h1>
            <span class="type">Module</span> 
            ActionDispatch::TestProcess 
            
        </h1>
        <ul class="files">
            
            <li><a href="../../files/actionpack/lib/action_dispatch/testing/test_process_rb.html">actionpack/lib/action_dispatch/testing/test_process.rb</a></li>
            
        </ul>
    </div>
    <div id="bodyContent">
        <div id="content">
  


  


  
  


  


  
    <!-- Method ref -->
    <div class="sectiontitle">Methods</div>
    <dl class="methods">
      
        <dt>A</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="TestProcess.html#method-i-assigns">assigns</a>
              </li>
            
          </ul>
        </dd>
      
        <dt>C</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="TestProcess.html#method-i-cookies">cookies</a>
              </li>
            
          </ul>
        </dd>
      
        <dt>F</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="TestProcess.html#method-i-fixture_file_upload">fixture_file_upload</a>,
              </li>
            
              
              <li>
                <a href="TestProcess.html#method-i-flash">flash</a>
              </li>
            
          </ul>
        </dd>
      
        <dt>R</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="TestProcess.html#method-i-redirect_to_url">redirect_to_url</a>
              </li>
            
          </ul>
        </dd>
      
        <dt>S</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="TestProcess.html#method-i-session">session</a>
              </li>
            
          </ul>
        </dd>
      
    </dl>
  

  



  

    

    

    


    


    <!-- Methods -->
        
      <div class="sectiontitle">Instance Public methods</div>
      
        <div class="method">
          <div class="title method-title" id="method-i-assigns">
            
              <b>assigns</b>(key = nil)
            
            <a href="TestProcess.html#method-i-assigns" name="method-i-assigns" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-assigns_source')" id="l_method-i-assigns_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/a779ea9d57b00bd3b59f5546603271c2d302247c/actionpack/lib/action_dispatch/testing/test_process.rb#L7" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-assigns_source" class="dyn-source">
                <pre><span class="ruby-comment"># File actionpack/lib/action_dispatch/testing/test_process.rb, line 7</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">assigns</span>(<span class="ruby-identifier">key</span> = <span class="ruby-keyword">nil</span>)
  <span class="ruby-identifier">assigns</span> = {}.<span class="ruby-identifier">with_indifferent_access</span>
  <span class="ruby-ivar">@controller</span>.<span class="ruby-identifier">view_assigns</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>, <span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-identifier">assigns</span>.<span class="ruby-identifier">regular_writer</span>(<span class="ruby-identifier">k</span>, <span class="ruby-identifier">v</span>) }
  <span class="ruby-identifier">key</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">assigns</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">assigns</span>[<span class="ruby-identifier">key</span>]
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-cookies">
            
              <b>cookies</b>()
            
            <a href="TestProcess.html#method-i-cookies" name="method-i-cookies" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-cookies_source')" id="l_method-i-cookies_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/a779ea9d57b00bd3b59f5546603271c2d302247c/actionpack/lib/action_dispatch/testing/test_process.rb#L21" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-cookies_source" class="dyn-source">
                <pre><span class="ruby-comment"># File actionpack/lib/action_dispatch/testing/test_process.rb, line 21</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">cookies</span>
  <span class="ruby-ivar">@request</span>.<span class="ruby-identifier">cookie_jar</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-fixture_file_upload">
            
              <b>fixture_file_upload</b>(path, mime_type = nil, binary = false)
            
            <a href="TestProcess.html#method-i-fixture_file_upload" name="method-i-fixture_file_upload" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              <p>Shortcut for
<code>Rack::Test::UploadedFile.new(File.join(ActionController::TestCase.fixture_path,
path), type)</code>:</p>

<pre>post :change_avatar, avatar: fixture_file_upload('files/spongebob.png', 'image/png')</pre>

<p>To upload binary files on Windows, pass <code>:binary</code> as the last
parameter. This will not affect other platforms:</p>

<pre>post :change_avatar, avatar: fixture_file_upload('files/spongebob.png', 'image/png', :binary)</pre>
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-fixture_file_upload_source')" id="l_method-i-fixture_file_upload_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/a779ea9d57b00bd3b59f5546603271c2d302247c/actionpack/lib/action_dispatch/testing/test_process.rb#L37" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-fixture_file_upload_source" class="dyn-source">
                <pre><span class="ruby-comment"># File actionpack/lib/action_dispatch/testing/test_process.rb, line 37</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">fixture_file_upload</span>(<span class="ruby-identifier">path</span>, <span class="ruby-identifier">mime_type</span> = <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">binary</span> = <span class="ruby-keyword">false</span>)
  <span class="ruby-keyword">if</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-value">:fixture_path</span>) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">fixture_path</span>
    <span class="ruby-identifier">path</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">fixture_path</span>, <span class="ruby-identifier">path</span>)
  <span class="ruby-keyword">end</span>
  <span class="ruby-constant">Rack</span><span class="ruby-operator">::</span><span class="ruby-constant">Test</span><span class="ruby-operator">::</span><span class="ruby-constant">UploadedFile</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">path</span>, <span class="ruby-identifier">mime_type</span>, <span class="ruby-identifier">binary</span>)
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-flash">
            
              <b>flash</b>()
            
            <a href="TestProcess.html#method-i-flash" name="method-i-flash" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-flash_source')" id="l_method-i-flash_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/a779ea9d57b00bd3b59f5546603271c2d302247c/actionpack/lib/action_dispatch/testing/test_process.rb#L17" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-flash_source" class="dyn-source">
                <pre><span class="ruby-comment"># File actionpack/lib/action_dispatch/testing/test_process.rb, line 17</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">flash</span>
  <span class="ruby-ivar">@request</span>.<span class="ruby-identifier">flash</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-redirect_to_url">
            
              <b>redirect_to_url</b>()
            
            <a href="TestProcess.html#method-i-redirect_to_url" name="method-i-redirect_to_url" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-redirect_to_url_source')" id="l_method-i-redirect_to_url_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/a779ea9d57b00bd3b59f5546603271c2d302247c/actionpack/lib/action_dispatch/testing/test_process.rb#L25" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-redirect_to_url_source" class="dyn-source">
                <pre><span class="ruby-comment"># File actionpack/lib/action_dispatch/testing/test_process.rb, line 25</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">redirect_to_url</span>
  <span class="ruby-ivar">@response</span>.<span class="ruby-identifier">redirect_url</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-session">
            
              <b>session</b>()
            
            <a href="TestProcess.html#method-i-session" name="method-i-session" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-session_source')" id="l_method-i-session_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/a779ea9d57b00bd3b59f5546603271c2d302247c/actionpack/lib/action_dispatch/testing/test_process.rb#L13" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-session_source" class="dyn-source">
                <pre><span class="ruby-comment"># File actionpack/lib/action_dispatch/testing/test_process.rb, line 13</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">session</span>
  <span class="ruby-ivar">@request</span>.<span class="ruby-identifier">session</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
                    </div>

    </div>
  </body>
</html>    